import request from '@/utils/request'

// 查询项目联系人列表
export function listDealContacts(query) {
  return request({
    url: '/contact/contactPerson/list',
    method: 'get',
    params: query
  })
}

// 查询项目联系人详细
export function getDealContacts(id) {
  return request({
    url: '/contact/contactPerson/' + id,
    method: 'get'
  })
}

// 保存项目联系人
export function saveDealContacts(data) {
  return request({
    url: '/contact/contactPerson/save',
    method: 'post',
    data: data
  })
}

// 删除项目联系人
export function delDealContacts(id) {
  return request({
    url: '/contact/contactPerson/' + id,
    method: 'delete'
  })
}

// 导出项目联系人
export function exportDealContacts(query) {
  return request({
    url: '/contact/contactPerson/export',
    method: 'get',
    params: query
  })
}

// 删除列表中的出资机构
export function delContactExperience(id) {
  return request({
    url: '/contact/contactPerson/delContactExperience/' + id,
    method: 'delete'
  })
}

// 删除取消导入的数据
export function deleteByIds(ids) {
  return request({
    url: '/contact/contactPerson/deleteByIds/' + ids,
    method: 'delete'
  })
}

// 验证姓名是否重复
export function verifyByContactsName(data) {
  return request({
    url: '/contact/contactPerson/verifyByContactsName',
    method: 'post',
    data: data
  })
}

// 根据businessId获取
export function getContactsByBusinessId(businessId) {
  return request({
    url: '/contact/contactPerson/getContactsByBusinessId/' + businessId,
    method: 'get'
  })
}
